import { defineStore } from "pinia"

interface IUserInfoRes {
    username: string;
    roles: string[]
}
export const useUserInfoStore = defineStore("userInfo", {
    state: (): IUserInfoRes => {
        return {
            username: "",
            roles: [],
        };
    },
    actions: {
        updateUserInfo(username: string, roles: string[]) {
            this.username = username;
            this.roles = roles;
        }
    }
})